package com.yoyo.itravel.bean;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.List;

/**
 * @Description 国家实体类
 *
 * @author HZX
 * @date 2020/5/8 23:01
 */
@Table(name = "tb_country")
public class Country implements Serializable {

    @Id
    @Column(name = "countryId")
    private String countryId; // 国家id
    @Column(name = "countryName")
    private String countryName; // 国家名称

    private List<Province> provinces; // 该国家下所有省份集合

    public Country() {
    }

    public Country(String countryId, String countryName, List<Province> provinces) {
        this.countryId = countryId;
        this.countryName = countryName;
        this.provinces = provinces;
    }

    public Country(String countryId, String countryName) {
        this.countryId = countryId;
        this.countryName = countryName;
    }

    public Country(String countryName) {
        this.countryName = countryName;
    }

    public String getCountryId() {
        return countryId;
    }

    public void setCountryId(String countryId) {
        this.countryId = countryId;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }

    public List<Province> getProvinces() {
        return provinces;
    }

    public void setProvinces(List<Province> provinces) {
        this.provinces = provinces;
    }

    @Override
    public String toString() {
        return "Country{" +
                "countryId='" + countryId + '\'' +
                ", countryName='" + countryName + '\'' +
                ", provinces=" + provinces +
                '}';
    }
}
